<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta charset="utf-8" name="viewport"
        content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
    <title>评论{{ lesson.name }}</title>
</head>

<body>
    <h1>{{ lesson.name }}</h1>
    <form class="comment-form">
        {% csrf_token %}
        <div class="form-item">
            <p>请输入你的昵称*</p>
            <input type="text" name="name" maxlength="25" required>
        </div>
        <div class="form-item">
            <p>请输入你这门课的成绩,非必需:)</p>
            <input type="number" step = "0.1" min="0" name="score">
        </div>
        <div class="form-item">
            <p>说说你对这门课的看法*</p>
            <textarea type="text" name="thoughts" required></textarea>
        </div>
        <div class="form-item">
            <p>请输入你的学期，格式：2020-1</p>
            <input type="text" maxlength="2000" name="term">
        </div>
        <input type="submit" value="提交">
    </form>
    <script>
        localStorage.setItem('lessonid', '{{ lesson.id }}');
        localStorage.setItem('lessonpage', "{% url 'lesson:lesson' lesson.id %}");
    </script>
    <script async src="/media/js/writecomment.js"></script>
</body>

</html>